﻿using UnityEngine;

public class MaterialTools {
	// === Public =====================================================================================================
	public static MaterialTools CreateInstance() {
		var instance = new MaterialTools();
		return instance;
	}

	public Color ConvertColor(int r, int g, int b, int a) {
		return new Color(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f);
	}

	public void SetTexture(GameObject go, Texture texture) {
		go.renderer.material.mainTexture = texture;
	}

	public void SetColor(GameObject go, Color color) {
		go.renderer.material.color = color;
	}
}